using System;

namespace PingPong.GameEngine.Parser
{

	public class Error
	{
		/// <summary>
		/// Gets the line.
		/// </summary>
		/// <value>The line.</value>
		public int Line { get; private set; }

		/// <summary>
		/// Gets the column.
		/// </summary>
		/// <value>The column.</value>
		public int Column { get; private set; }

		/// <summary>
		/// Gets the description.
		/// </summary>
		/// <value>The description.</value>
		public string Description { get; private set; }

		/// <summary>
		/// Gets the token.
		/// </summary>
		/// <value>The token.</value>
		public Token Token { get; private set; }

		/// <summary>
		/// Initializes a new instance of the <see cref="PingPong.GameEngine.Parser.Error"/> class.
		/// </summary>
		private Error()
		{
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="PingPong.GameEngine.Parser.Error"/> class.
		/// </summary>
		/// <param name="line">Line.</param>
		/// <param name="column">Column.</param>
		/// <param name="description">Description.</param>
		/// <param name="token">Token.</param>
		public Error(int line, int column, string description, Token token)
		{
			this.Line = line;
			this.Column = column;
			this.Description = description;
			this.Token = token;
		}

		/// <summary>
		/// Initializes a new instance of the <see cref="PingPong.GameEngine.Parser.Error"/> class.
		/// </summary>
		/// <param name="description">Description.</param>
		/// <param name="token">Token.</param>
		public Error(string description, Token token)
		{
			this.Line = token.line;
			this.Column = token.col;
			this.Description = description;
			this.Token = token;
		}
	}
}

